/* ============================================================
   GREENWICH ENTERPRISE DESIGN SYSTEM — v2.0 May 2026
   Full CSS Design System: Tokens · Typography · Layout · Components
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Roboto+Mono:wght@400;500;600&display=swap');

/* ─── 1. DESIGN TOKENS ─────────────────────────────────────── */
:root {
  /* Brand Palette */
  --grw-white:        #FFFFFF;
  --grw-grey:         #6E6E6E;
  --grw-light-green:  #84CA23;
  --grw-deep-green:   #006527;
  --grw-dark-green:   #144733;

  /* Semantic Status */
  --color-success:    #16803C;
  --color-warning:    #B7791F;
  --color-error:      #B42318;
  --color-info:       #175CD3;
  --color-pending:    #7A5AF8;
  --color-payment:    #087443;

  /* Semantic UI Tokens — Light Mode */
  --color-bg:           #F8FAF9;
  --color-surface:      #FFFFFF;
  --color-surface-alt:  #F3F6F4;
  --color-border:       #CBD5D0;
  --color-border-subtle:#E7ECE9;
  --color-text:         #1E2A26;
  --color-text-muted:   #8A9691;
  --color-text-secondary:#33413C;

  /* Brand Interaction */
  --color-primary:        var(--grw-deep-green);
  --color-primary-hover:  #00551F;
  --color-primary-active: #00461A;
  --color-accent:         var(--grw-light-green);

  /* Focus & Selection */
  --focus-shadow:    0 0 0 3px rgba(132, 202, 35, 0.35);
  --selection-bg:    #E8F7DA;
  --overlay-bg:      rgba(16, 24, 22, 0.56);

  /* Neutrals Scale */
  --n1: #F8FAF9;  --n2: #F3F6F4;  --n3: #E7ECE9;
  --n4: #CBD5D0;  --n5: #8A9691;  --n6: #33413C;
  --n7: #1E2A26;  --n8: #101816;

  /* Spacing */
  --sp-1: 4px;   --sp-2: 8px;   --sp-3: 12px;  --sp-4: 16px;
  --sp-5: 20px;  --sp-6: 24px;  --sp-8: 32px;  --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px;

  /* Border Radius */
  --r-sm: 6px;  --r-md: 10px;  --r-lg: 16px;  --r-xl: 24px;  --r-full: 9999px;

  /* Elevation / Shadows */
  --shadow-xs:  0 1px 2px rgba(16, 24, 22, 0.06);
  --shadow-sm:  0 1px 3px rgba(16, 24, 22, 0.08), 0 1px 2px rgba(16, 24, 22, 0.06);
  --shadow-md:  0 4px 12px rgba(16, 24, 22, 0.10), 0 2px 4px rgba(16, 24, 22, 0.06);
  --shadow-lg:  0 12px 32px rgba(16, 24, 22, 0.14), 0 4px 8px rgba(16, 24, 22, 0.08);
  --shadow-xl:  0 24px 48px rgba(16, 24, 22, 0.18), 0 8px 16px rgba(16, 24, 22, 0.10);

  /* Typography */
  --font-ui:   'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Roboto Mono', 'Consolas', 'Courier New', monospace;

  /* Z-Index Scale */
  --z-base: 0; --z-sticky: 100; --z-dropdown: 300;
  --z-toast: 600; --z-drawer: 700; --z-modal: 800; --z-critical: 900;

  /* Transitions */
  --transition-fast:   150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base:   200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:   300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 250ms cubic-bezier(0.0, 0.0, 0.2, 1);

  /* Sidebar */
  --sidebar-width:          280px;
  --sidebar-collapsed-width: 72px;
  --topbar-height:           64px;
}

/* Dark Mode */
[data-theme="dark"] {
  --color-bg:           #0B1210;
  --color-surface:      #101816;
  --color-surface-alt:  #17211D;
  --color-border:       #2B3A34;
  --color-border-subtle:#1E2D28;
  --color-text:         #EAF2EE;
  --color-text-muted:   #A7B4AF;
  --color-text-secondary:#C5D3CD;
  --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md:  0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg:  0 12px 32px rgba(0, 0, 0, 0.4);
  --shadow-xl:  0 24px 48px rgba(0, 0, 0, 0.5);
}

/* ─── 2. RESET & BASE ──────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: var(--selection-bg);
  color: var(--grw-dark-green);
}

img, svg { display: block; max-width: 100%; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-primary-hover); }
button { font-family: var(--font-ui); cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: var(--font-ui); }
ul, ol { list-style: none; }
hr { border: none; border-top: 1px solid var(--color-border-subtle); }

:focus-visible {
  outline: none;
  box-shadow: var(--focus-shadow);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── 3. TYPOGRAPHY ────────────────────────────────────────── */
.grw-display { font-size: 56px; line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; color: var(--color-text); }
.grw-h1      { font-size: 36px; line-height: 1.15; font-weight: 700; letter-spacing: -0.015em; color: var(--color-text); }
.grw-h2      { font-size: 26px; line-height: 1.2;  font-weight: 650; letter-spacing: -0.01em;  color: var(--color-text); }
.grw-h3      { font-size: 20px; line-height: 1.3;  font-weight: 650; color: var(--color-text); }
.grw-h4      { font-size: 16px; line-height: 1.35; font-weight: 600; color: var(--color-text); }
.grw-body    { font-size: 14px; line-height: 1.5;  font-weight: 400; color: var(--color-text); }
.grw-body-sm { font-size: 13px; line-height: 1.45; font-weight: 400; color: var(--color-text-secondary); }
.grw-caption { font-size: 12px; line-height: 1.4;  font-weight: 400; color: var(--color-text-muted); }
.grw-label   { font-size: 11px; line-height: 1.3;  font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-muted); }
.grw-mono    { font-family: var(--font-mono); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }

.text-primary   { color: var(--color-primary); }
.text-accent    { color: var(--grw-light-green); }
.text-muted     { color: var(--color-text-muted); }
.text-success   { color: var(--color-success); }
.text-warning   { color: var(--color-warning); }
.text-error     { color: var(--color-error); }
.text-info      { color: var(--color-info); }
.text-pending   { color: var(--color-pending); }

/* ─── 4. APP SHELL / LAYOUT ────────────────────────────────── */
.grw-shell {
  display: flex;
  min-height: 100dvh;
  background: var(--color-bg);
}

/* Sidebar */
.grw-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--grw-dark-green) 0%, #0F3826 100%);
  display: flex;
  flex-direction: column;
  z-index: var(--z-drawer);
  transition: width var(--transition-slow), transform var(--transition-slow);
  overflow: hidden;
}

.grw-sidebar.is-collapsed {
  width: var(--sidebar-collapsed-width);
}

/* ── Collapsed sidebar: icon-only mode ─────────────────────── */
.grw-sidebar.is-collapsed .grw-sidebar__brand { justify-content: center; gap: 0; }
.grw-sidebar.is-collapsed .grw-sidebar__user  { justify-content: center; }
.grw-sidebar.is-collapsed .grw-nav-item       { justify-content: center; padding-inline: 0; }

.grw-sidebar.is-collapsed .grw-sidebar__name,
.grw-sidebar.is-collapsed .grw-sidebar__tagline,
.grw-sidebar.is-collapsed .grw-nav-group__label,
.grw-sidebar.is-collapsed .grw-nav-item > span,
.grw-sidebar.is-collapsed .grw-nav-item__badge,
.grw-sidebar.is-collapsed .grw-sidebar__user-info {
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 150ms ease, max-width 260ms cubic-bezier(0.4,0,0.2,1);
}

.grw-sidebar:not(.is-collapsed) .grw-sidebar__name,
.grw-sidebar:not(.is-collapsed) .grw-sidebar__tagline,
.grw-sidebar:not(.is-collapsed) .grw-nav-group__label,
.grw-sidebar:not(.is-collapsed) .grw-nav-item > span,
.grw-sidebar:not(.is-collapsed) .grw-nav-item__badge,
.grw-sidebar:not(.is-collapsed) .grw-sidebar__user-info {
  opacity: 1;
  max-width: 220px;
  transition: opacity 180ms ease 80ms, max-width 260ms cubic-bezier(0.4,0,0.2,1);
}

/* Floating tooltip — injected by GRW.Sidebar, escapes overflow:hidden */
.grw-nav-tooltip {
  position: fixed;
  z-index: var(--z-dropdown);
  background: #0c2218;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-50%) translateX(-6px);
  transition: opacity 140ms ease, transform 140ms ease;
  line-height: 1.4;
}
.grw-nav-tooltip.is-visible {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.grw-sidebar__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-5);
  height: var(--topbar-height);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.grw-sidebar__logo {
  width: 36px;
  height: 36px;
  background: var(--grw-light-green);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--grw-dark-green);
  letter-spacing: -0.02em;
}

.grw-sidebar__name {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.grw-sidebar__tagline {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.grw-sidebar__body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--sp-4) var(--sp-3);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.grw-sidebar__body::-webkit-scrollbar { width: 4px; }
.grw-sidebar__body::-webkit-scrollbar-track { background: transparent; }
.grw-sidebar__body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.grw-nav-group { margin-bottom: var(--sp-6); }

.grw-nav-group__label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  padding: 0 var(--sp-3) var(--sp-2);
  white-space: nowrap;
  overflow: hidden;
}

.grw-nav-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-3);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  position: relative;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  margin-bottom: 2px;
  border: 1px solid transparent;
}

.grw-nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.95);
  border-color: rgba(255,255,255,0.06);
}

.grw-nav-item.is-active {
  background: rgba(132, 202, 35, 0.14);
  color: #FFFFFF;
  border-color: rgba(132, 202, 35, 0.2);
}

.grw-nav-item.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--grw-light-green);
  border-radius: 0 2px 2px 0;
}

.grw-nav-item__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.8;
}

.grw-nav-item.is-active .grw-nav-item__icon { opacity: 1; }

.grw-nav-item__badge {
  margin-left: auto;
  background: var(--grw-light-green);
  color: var(--grw-dark-green);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--r-full);
  line-height: 1.4;
  flex-shrink: 0;
}

.grw-sidebar__footer {
  padding: var(--sp-4) var(--sp-3);
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.grw-sidebar__user {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.grw-sidebar__user:hover { background: rgba(255,255,255,0.08); }

.grw-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--grw-light-green), var(--grw-deep-green));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.grw-avatar--lg { width: 40px; height: 40px; font-size: 15px; }
.grw-avatar--xl { width: 56px; height: 56px; font-size: 20px; }

.grw-sidebar__user-info { overflow: hidden; }
.grw-sidebar__user-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grw-sidebar__user-role { font-size: 11px; color: rgba(255,255,255,0.45); white-space: nowrap; }

/* Topbar */
.grw-topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-subtle);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: 0 var(--sp-8);
  z-index: var(--z-sticky);
  transition: left var(--transition-slow), box-shadow var(--transition-fast);
  box-shadow: var(--shadow-xs);
}

.grw-shell.sidebar-collapsed .grw-topbar {
  left: var(--sidebar-collapsed-width);
}

.grw-topbar__toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  flex-shrink: 0;
}
.grw-topbar__toggle:hover { background: var(--color-surface-alt); color: var(--color-text); }

.grw-topbar__breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  color: var(--color-text-muted);
}
.grw-topbar__breadcrumb a { color: var(--color-text-muted); }
.grw-topbar__breadcrumb a:hover { color: var(--color-primary); }
.grw-topbar__breadcrumb span { color: var(--color-text); font-weight: 500; }

.grw-topbar__search {
  flex: 1;
  max-width: 400px;
  margin-left: auto;
}

.grw-topbar__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-left: auto;
}

.grw-topbar__action-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  position: relative;
}
.grw-topbar__action-btn:hover { background: var(--color-surface-alt); color: var(--color-text); }

.grw-topbar__notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--color-error);
  border-radius: var(--r-full);
  border: 2px solid var(--color-surface);
}

.grw-env-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: var(--r-full);
  background: rgba(0, 101, 39, 0.1);
  color: var(--grw-deep-green);
  border: 1px solid rgba(0, 101, 39, 0.2);
}

/* Main content */
.grw-main {
  margin-left: var(--sidebar-width);
  padding-top: var(--topbar-height);
  min-height: 100dvh;
  transition: margin-left var(--transition-slow);
  flex: 1;
}

.grw-shell.sidebar-collapsed .grw-main {
  margin-left: var(--sidebar-collapsed-width);
}

.grw-content {
  padding: var(--sp-8);
  max-width: 1440px;
}

.grw-page-header {
  margin-bottom: var(--sp-8);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.grw-page-header__left { flex: 1; min-width: 0; }
.grw-page-header__title { font-size: 24px; font-weight: 700; color: var(--color-text); letter-spacing: -0.01em; line-height: 1.2; }
.grw-page-header__subtitle { font-size: 14px; color: var(--color-text-muted); margin-top: var(--sp-1); }

/* ─── 5. BUTTONS ────────────────────────────────────────────── */
.grw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0 var(--sp-5);
  height: 40px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
  border: 1.5px solid transparent;
  position: relative;
  overflow: hidden;
  font-family: var(--font-ui);
  letter-spacing: 0.01em;
}

.grw-btn:focus-visible { box-shadow: var(--focus-shadow); }
.grw-btn:disabled, .grw-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary */
.grw-btn--primary {
  background: var(--grw-deep-green);
  color: #FFFFFF;
  border-color: var(--grw-deep-green);
}
.grw-btn--primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); color: #fff; }
.grw-btn--primary:active { background: var(--color-primary-active); transform: scale(0.98); }

/* Secondary */
.grw-btn--secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}
.grw-btn--secondary:hover { background: var(--color-surface-alt); border-color: var(--n5); color: var(--color-text); }
.grw-btn--secondary:active { background: var(--n3); transform: scale(0.98); }

/* Ghost */
.grw-btn--ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border-color: transparent;
}
.grw-btn--ghost:hover { background: var(--color-surface-alt); color: var(--color-text); }
.grw-btn--ghost:active { background: var(--n3); }

/* Outline */
.grw-btn--outline {
  background: transparent;
  color: var(--grw-deep-green);
  border-color: var(--grw-deep-green);
}
.grw-btn--outline:hover { background: rgba(0, 101, 39, 0.06); color: var(--color-primary-hover); }

/* Danger */
.grw-btn--danger {
  background: var(--color-error);
  color: #FFFFFF;
  border-color: var(--color-error);
}
.grw-btn--danger:hover { background: #9B1F16; border-color: #9B1F16; color: #fff; }

/* Accent */
.grw-btn--accent {
  background: var(--grw-light-green);
  color: var(--grw-dark-green);
  border-color: var(--grw-light-green);
  font-weight: 700;
}
.grw-btn--accent:hover { background: #78BA1F; border-color: #78BA1F; color: var(--grw-dark-green); }

/* Sizes */
.grw-btn--sm { height: 32px; padding: 0 var(--sp-4); font-size: 13px; border-radius: var(--r-sm); }
.grw-btn--lg { height: 48px; padding: 0 var(--sp-8); font-size: 15px; border-radius: var(--r-lg); }
.grw-btn--xl { height: 56px; padding: 0 var(--sp-10); font-size: 16px; border-radius: var(--r-lg); }

/* Icon button */
.grw-btn--icon { width: 40px; height: 40px; padding: 0; border-radius: var(--r-md); }
.grw-btn--icon.grw-btn--sm { width: 32px; height: 32px; }
.grw-btn--icon.grw-btn--lg { width: 48px; height: 48px; }

/* Loading */
.grw-btn.is-loading { pointer-events: none; }
.grw-btn.is-loading .grw-btn__text { opacity: 0; }
.grw-btn.is-loading::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: grw-spin 0.65s linear infinite;
}

/* Full width */
.grw-btn--full { width: 100%; }

/* ─── 6. BADGES & CHIPS ─────────────────────────────────────── */
.grw-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px var(--sp-3);
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.grw-badge--dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  opacity: 0.8;
}

.grw-badge--success  { background: rgba(22, 128, 60, 0.12);  color: #0D5C2C; border: 1px solid rgba(22, 128, 60, 0.2); }
.grw-badge--warning  { background: rgba(183, 121, 31, 0.12); color: #8B5A0F; border: 1px solid rgba(183, 121, 31, 0.2); }
.grw-badge--error    { background: rgba(180, 35, 24, 0.10);  color: #8B1A12; border: 1px solid rgba(180, 35, 24, 0.2); }
.grw-badge--info     { background: rgba(23, 92, 211, 0.10);  color: #0E3FA8; border: 1px solid rgba(23, 92, 211, 0.2); }
.grw-badge--pending  { background: rgba(122, 90, 248, 0.12); color: #5B37DF; border: 1px solid rgba(122, 90, 248, 0.2); }
.grw-badge--payment  { background: rgba(8, 116, 67, 0.10);   color: #065C35; border: 1px solid rgba(8, 116, 67, 0.2); }
.grw-badge--neutral  { background: var(--color-surface-alt); color: var(--color-text-secondary); border: 1px solid var(--color-border-subtle); }
.grw-badge--primary  { background: rgba(0, 101, 39, 0.10);   color: var(--grw-deep-green); border: 1px solid rgba(0, 101, 39, 0.2); }

[data-theme="dark"] .grw-badge--success  { background: rgba(22, 128, 60, 0.2);  color: #4ADE80; border-color: rgba(22, 128, 60, 0.3); }
[data-theme="dark"] .grw-badge--warning  { background: rgba(183, 121, 31, 0.2); color: #FBB045; border-color: rgba(183, 121, 31, 0.3); }
[data-theme="dark"] .grw-badge--error    { background: rgba(180, 35, 24, 0.2);  color: #F87171; border-color: rgba(180, 35, 24, 0.3); }
[data-theme="dark"] .grw-badge--info     { background: rgba(23, 92, 211, 0.2);  color: #60A5FA; border-color: rgba(23, 92, 211, 0.3); }
[data-theme="dark"] .grw-badge--pending  { background: rgba(122, 90, 248, 0.2); color: #A78BFA; border-color: rgba(122, 90, 248, 0.3); }
[data-theme="dark"] .grw-badge--primary  { background: rgba(0, 101, 39, 0.2);   color: var(--grw-light-green); border-color: rgba(0, 101, 39, 0.3); }

/* Filter chips */
.grw-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 500;
  background: var(--color-surface);
  color: var(--color-text-secondary);
  border: 1.5px solid var(--color-border);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.grw-chip:hover { border-color: var(--grw-deep-green); color: var(--grw-deep-green); background: rgba(0,101,39,0.04); }
.grw-chip.is-active { background: var(--grw-deep-green); color: #fff; border-color: var(--grw-deep-green); }

/* ─── 7. CARDS ──────────────────────────────────────────────── */
.grw-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

.grw-card--hoverable:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-border);
  cursor: pointer;
}

.grw-card--selected {
  border-color: var(--grw-deep-green);
  box-shadow: 0 0 0 2px rgba(0, 101, 39, 0.15), var(--shadow-sm);
}

.grw-card__header {
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--color-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.grw-card__title { font-size: 15px; font-weight: 650; color: var(--color-text); }
.grw-card__subtitle { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }

.grw-card__body { padding: var(--sp-6); }
.grw-card__footer {
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--color-border-subtle);
  background: var(--color-surface-alt);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

/* KPI Card */
.grw-kpi {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition-base);
}
.grw-kpi:hover { box-shadow: var(--shadow-md); }

.grw-kpi__icon {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-4);
}

.grw-kpi__icon--primary { background: rgba(0, 101, 39, 0.1); color: var(--grw-deep-green); }
.grw-kpi__icon--success { background: rgba(22, 128, 60, 0.1); color: var(--color-success); }
.grw-kpi__icon--warning { background: rgba(183, 121, 31, 0.1); color: var(--color-warning); }
.grw-kpi__icon--info    { background: rgba(23, 92, 211, 0.1);  color: var(--color-info); }
.grw-kpi__icon--pending { background: rgba(122, 90, 248, 0.1); color: var(--color-pending); }
.grw-kpi__icon--error   { background: rgba(180, 35, 24, 0.1);  color: var(--color-error); }

.grw-kpi__label { font-size: 12px; font-weight: 600; color: var(--color-text-muted); letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: var(--sp-2); }
.grw-kpi__value { font-size: 28px; font-weight: 750; color: var(--color-text); letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.grw-kpi__delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-top: var(--sp-3);
}
.grw-kpi__delta--up   { color: var(--color-success); }
.grw-kpi__delta--down { color: var(--color-error); }
.grw-kpi__period { font-size: 11px; color: var(--color-text-muted); margin-top: 2px; }

.grw-kpi__sparkline {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 80px;
  height: 40px;
  opacity: 0.15;
}

/* KPI Card — alternate component used across operational pages */
.grw-kpi-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base);
}
.grw-kpi-card:hover { box-shadow: var(--shadow-md); }

.grw-kpi-card__label {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.grw-kpi-card__value {
  font-size: 26px;
  font-weight: 800;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin: 6px 0 2px;
  line-height: 1.1;
}
.grw-kpi-card__delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  margin-top: var(--sp-2);
  color: var(--color-text-muted);
}
.grw-kpi-card__delta--up      { color: var(--color-success); }
.grw-kpi-card__delta--down    { color: var(--color-error); }
.grw-kpi-card__delta--neutral,
.grw-kpi-card__delta--warning { color: var(--color-warning); }
.grw-kpi-card__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Icon colour utilities — pair with .grw-kpi-card__icon */
.icon-primary { background: rgba(0,   101,  39,  0.1); color: var(--grw-deep-green); }
.icon-success { background: rgba(22,  128,  60,  0.1); color: var(--color-success);  }
.icon-warning { background: rgba(183, 121,  31,  0.1); color: var(--color-warning);  }
.icon-info    { background: rgba(23,  92,   211, 0.1); color: var(--color-info);     }
.icon-pending { background: rgba(122, 90,   248, 0.1); color: var(--color-pending);  }
.icon-error   { background: rgba(180, 35,   24,  0.1); color: var(--color-error);    }

/* ─── 8. FORMS ──────────────────────────────────────────────── */
.grw-form-group { margin-bottom: var(--sp-5); }

.grw-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: var(--sp-2);
  line-height: 1.3;
}

.grw-label__required {
  color: var(--color-error);
  margin-left: 3px;
  font-weight: 700;
}

.grw-input {
  display: block;
  width: 100%;
  height: 40px;
  padding: 0 var(--sp-4);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--color-text);
  font-family: var(--font-ui);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.grw-input::placeholder { color: var(--color-text-muted); }
.grw-input:hover:not(:disabled):not(:focus) { border-color: var(--n5); }
.grw-input:focus { border-color: var(--grw-deep-green); box-shadow: var(--focus-shadow); }
.grw-input:disabled { background: var(--n3); color: var(--n5); cursor: not-allowed; }

.grw-input--error { border-color: var(--color-error) !important; }
.grw-input--error:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.2); }
.grw-input--success { border-color: var(--color-success) !important; }

.grw-textarea {
  height: auto;
  min-height: 100px;
  padding: var(--sp-3) var(--sp-4);
  resize: vertical;
  line-height: 1.5;
}

.grw-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A9691' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; cursor: pointer; }
.grw-select--sm { height: 32px; font-size: 12px; padding-top: 0; padding-bottom: 0; }

/* ─── COMBOBOX (Searchable Select) ────────────────────────── */
.grw-combobox { position: relative; }
.grw-combobox__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 40px;
  padding: 0 var(--sp-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  font-size: 14px;
  font-family: var(--font-ui);
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
  gap: var(--sp-2);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.grw-combobox__trigger:hover { border-color: var(--grw-deep-green); }
.grw-combobox__trigger:focus,
.grw-combobox.is-open .grw-combobox__trigger {
  outline: none;
  border-color: var(--grw-deep-green);
  box-shadow: var(--focus-shadow);
}
.grw-combobox__value { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grw-combobox__value--placeholder { color: var(--color-text-muted); }
.grw-combobox__chevron {
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: transform var(--transition-fast);
}
.grw-combobox.is-open .grw-combobox__chevron { transform: rotate(180deg); }

.grw-combobox__dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.grw-combobox.is-open .grw-combobox__dropdown { display: flex; }

.grw-combobox__search-wrap {
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--color-border-subtle);
}
.grw-combobox__search {
  width: 100%;
  height: 34px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--color-border);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-family: var(--font-ui);
  color: var(--color-text);
  background: var(--color-surface-alt);
  outline: none;
  transition: border-color var(--transition-fast);
}
.grw-combobox__search:focus { border-color: var(--grw-deep-green); box-shadow: var(--focus-shadow); }

.grw-combobox__list {
  list-style: none;
  margin: 0;
  padding: var(--sp-1) 0;
  overflow-y: auto;
  max-height: 220px;
}
.grw-combobox__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-2) var(--sp-4);
  font-size: 14px;
  color: var(--color-text);
  cursor: pointer;
  transition: background var(--transition-fast);
  gap: var(--sp-2);
}
.grw-combobox__option:hover,
.grw-combobox__option[aria-selected="true"] { background: var(--color-surface-alt); }
.grw-combobox__option.is-selected { color: var(--grw-deep-green); font-weight: 600; }
.grw-combobox__option.is-focused { background: var(--selection-bg); }
.grw-combobox__check {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--grw-deep-green);
  opacity: 0;
}
.grw-combobox__option.is-selected .grw-combobox__check { opacity: 1; }
.grw-combobox__empty {
  padding: var(--sp-4);
  font-size: 13px;
  color: var(--color-text-muted);
  text-align: center;
}

/* ─── END COMBOBOX ─────────────────────────────────────────── */

/* Input with icon */
.grw-input-wrap { position: relative; }
.grw-input-wrap .grw-input { padding-left: var(--sp-10); }
.grw-input-wrap .grw-input--icon-right { padding-right: var(--sp-10); padding-left: var(--sp-4); }
.grw-input-icon {
  position: absolute;
  top: 50%; left: var(--sp-3);
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--color-text-muted);
  pointer-events: none;
}
.grw-input-icon--right { left: auto; right: var(--sp-3); }

/* Helper / error text */
.grw-helper { font-size: 12px; color: var(--color-text-muted); margin-top: var(--sp-2); }
.grw-error-msg { font-size: 12px; color: var(--color-error); margin-top: var(--sp-2); display: flex; align-items: center; gap: 5px; }

/* Checkbox & Radio */
.grw-check {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  cursor: pointer;
  font-size: 14px;
  color: var(--color-text);
}

.grw-check__input {
  width: 18px; height: 18px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  appearance: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
}

.grw-check__input:checked {
  background: var(--grw-deep-green);
  border-color: var(--grw-deep-green);
}

.grw-check__input:checked::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3.5 3.5L11 1' stroke='white' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}

.grw-check__input:focus-visible { box-shadow: var(--focus-shadow); }

.grw-radio__input {
  border-radius: 50%;
}
.grw-radio__input:checked::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 7px; height: 7px;
  background: #fff;
  border-radius: 50%;
}

/* Toggle Switch */
.grw-toggle { display: flex; align-items: center; gap: var(--sp-3); cursor: pointer; }
.grw-toggle__input { display: none; }
.grw-toggle__track {
  width: 44px; height: 24px;
  background: var(--n4);
  border-radius: var(--r-full);
  position: relative;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}
.grw-toggle__thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}
.grw-toggle__input:checked + .grw-toggle__track { background: var(--grw-deep-green); }
.grw-toggle__input:checked + .grw-toggle__track .grw-toggle__thumb { transform: translateX(20px); }

/* Search input */
.grw-search {
  position: relative;
}
.grw-search .grw-input { padding-left: 38px; background: var(--color-surface-alt); }
.grw-search .grw-input:focus { background: var(--color-surface); }
.grw-search__icon { position: absolute; top: 50%; left: 12px; transform: translateY(-50%); color: var(--color-text-muted); width: 16px; height: 16px; pointer-events: none; }

/* ─── 9. TABLES ─────────────────────────────────────────────── */
.grw-table-wrap {
  overflow-x: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-sm);
}

.grw-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--color-surface);
}

.grw-table th {
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border-subtle);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.grw-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.grw-table th.sortable:hover { color: var(--color-text); }

.grw-table th .sort-icon { display: inline-block; margin-left: 4px; opacity: 0.4; }
.grw-table th.sorted-asc .sort-icon,
.grw-table th.sorted-desc .sort-icon { opacity: 1; color: var(--grw-deep-green); }

.grw-table td {
  padding: var(--sp-4);
  border-bottom: 1px solid var(--color-border-subtle);
  color: var(--color-text);
  vertical-align: middle;
}

.grw-table tr:last-child td { border-bottom: none; }

.grw-table tbody tr {
  transition: background var(--transition-fast);
}

.grw-table tbody tr:hover { background: rgba(0, 101, 39, 0.025); }

.grw-table td.grw-table__amount {
  font-family: var(--font-mono);
  text-align: right;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.grw-table td.grw-table__status { white-space: nowrap; }

/* Row states */
.grw-table tr.row--pending td:first-child { box-shadow: inset 3px 0 0 var(--color-pending); }
.grw-table tr.row--approved td:first-child { box-shadow: inset 3px 0 0 var(--color-success); }
.grw-table tr.row--rejected td:first-child { box-shadow: inset 3px 0 0 var(--color-error); }
.grw-table tr.row--warning td:first-child { box-shadow: inset 3px 0 0 var(--color-warning); }

/* Table toolbar */
.grw-table-toolbar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-4);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-subtle);
  flex-wrap: wrap;
}

.grw-table-toolbar__left { display: flex; align-items: center; gap: var(--sp-3); flex: 1; flex-wrap: wrap; }
.grw-table-toolbar__right { display: flex; align-items: center; gap: var(--sp-2); }

/* Pagination */
.grw-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--color-border-subtle);
  background: var(--color-surface);
  font-size: 13px;
  color: var(--color-text-muted);
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.grw-pagination__info { white-space: nowrap; }

.grw-pagination__pages {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.grw-page-btn {
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--color-text-secondary);
  border: 1px solid transparent;
}
.grw-page-btn:hover { background: var(--color-surface-alt); border-color: var(--color-border-subtle); }
.grw-page-btn.is-active { background: var(--grw-deep-green); color: #fff; border-color: var(--grw-deep-green); }
.grw-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── 10. MODALS ─────────────────────────────────────────────── */
.grw-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-bg);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.grw-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.grw-modal {
  background: var(--color-surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(16px) scale(0.97);
  transition: transform var(--transition-smooth);
  border: 1px solid var(--color-border-subtle);
  overflow: hidden;
}

.grw-overlay.is-open .grw-modal {
  transform: translateY(0) scale(1);
}

.grw-modal--sm { max-width: 400px; }
.grw-modal--lg { max-width: 720px; }
.grw-modal--xl { max-width: 960px; }

.grw-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-6);
  border-bottom: 1px solid var(--color-border-subtle);
}

.grw-modal__title { font-size: 17px; font-weight: 700; color: var(--color-text); line-height: 1.3; }
.grw-modal__subtitle { font-size: 13px; color: var(--color-text-muted); margin-top: 3px; }

.grw-modal__close {
  width: 32px; height: 32px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  margin-top: -2px;
}
.grw-modal__close:hover { background: var(--color-surface-alt); color: var(--color-text); }

.grw-modal__body { padding: var(--sp-6); overflow-y: auto; flex: 1; }

.grw-modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-6);
  border-top: 1px solid var(--color-border-subtle);
  background: var(--color-surface-alt);
}

/* Drawer */
.grw-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 520px;
  max-width: 92vw;
  background: var(--color-surface);
  box-shadow: var(--shadow-xl);
  z-index: var(--z-drawer);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-slow);
  border-left: 1px solid var(--color-border-subtle);
}

.grw-drawer.is-open { transform: translateX(0); }
.grw-drawer__header { padding: var(--sp-6); border-bottom: 1px solid var(--color-border-subtle); display: flex; align-items: center; justify-content: space-between; }
.grw-drawer__body { padding: var(--sp-6); flex: 1; overflow-y: auto; }
.grw-drawer__footer { padding: var(--sp-5) var(--sp-6); border-top: 1px solid var(--color-border-subtle); background: var(--color-surface-alt); display: flex; gap: var(--sp-3); justify-content: flex-end; }

/* ─── 11. TOASTS ─────────────────────────────────────────────── */
.grw-toast-stack {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  pointer-events: none;
  width: 340px;
}

.grw-toast {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  animation: grw-toast-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  position: relative;
}

.grw-toast.is-dismissing { animation: grw-toast-out 0.2s ease-in forwards; }

.grw-toast__icon { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.grw-toast__content { flex: 1; min-width: 0; }
.grw-toast__title { font-size: 14px; font-weight: 650; color: var(--color-text); }
.grw-toast__message { font-size: 13px; color: var(--color-text-muted); margin-top: 2px; line-height: 1.4; }
.grw-toast__close { width: 20px; height: 20px; color: var(--color-text-muted); cursor: pointer; flex-shrink: 0; transition: color var(--transition-fast); }
.grw-toast__close:hover { color: var(--color-text); }
.grw-toast__progress { position: absolute; bottom: 0; left: 0; height: 3px; border-radius: 0 0 0 var(--r-lg); animation: grw-progress 4s linear forwards; }

.grw-toast--success { border-left: 3px solid var(--color-success); }
.grw-toast--success .grw-toast__icon { color: var(--color-success); }
.grw-toast--success .grw-toast__progress { background: var(--color-success); }
.grw-toast--error { border-left: 3px solid var(--color-error); }
.grw-toast--error .grw-toast__icon { color: var(--color-error); }
.grw-toast--warning { border-left: 3px solid var(--color-warning); }
.grw-toast--warning .grw-toast__icon { color: var(--color-warning); }
.grw-toast--info { border-left: 3px solid var(--color-info); }
.grw-toast--info .grw-toast__icon { color: var(--color-info); }

/* ─── 12. ALERTS ─────────────────────────────────────────────── */
.grw-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-lg);
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid transparent;
}

.grw-alert__icon { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.grw-alert__body { flex: 1; }
.grw-alert__title { font-weight: 650; margin-bottom: 3px; }

.grw-alert--success { background: rgba(22, 128, 60, 0.08); border-color: rgba(22, 128, 60, 0.2); color: #0D5C2C; }
.grw-alert--warning { background: rgba(183, 121, 31, 0.08); border-color: rgba(183, 121, 31, 0.2); color: #8B5A0F; }
.grw-alert--error   { background: rgba(180, 35, 24, 0.07);  border-color: rgba(180, 35, 24, 0.2);  color: #8B1A12; }
.grw-alert--info    { background: rgba(23, 92, 211, 0.07);  border-color: rgba(23, 92, 211, 0.2);  color: #0E3FA8; }

[data-theme="dark"] .grw-alert--success { background: rgba(22, 128, 60, 0.15); color: #86efac; }
[data-theme="dark"] .grw-alert--warning { background: rgba(183, 121, 31, 0.15); color: #fcd34d; }
[data-theme="dark"] .grw-alert--error   { background: rgba(180, 35, 24, 0.15);  color: #fca5a5; }
[data-theme="dark"] .grw-alert--info    { background: rgba(23, 92, 211, 0.15);  color: #93c5fd; }

/* ─── 13. SKELETON LOADERS ──────────────────────────────────── */
.grw-skeleton {
  background: linear-gradient(90deg, var(--n3) 25%, var(--n2) 50%, var(--n3) 75%);
  background-size: 200% 100%;
  animation: grw-shimmer 1.5s infinite;
  border-radius: var(--r-sm);
}

[data-theme="dark"] .grw-skeleton {
  background: linear-gradient(90deg, #1A2722 25%, #1F2F29 50%, #1A2722 75%);
  background-size: 200% 100%;
}

.grw-skeleton--text  { height: 14px; }
.grw-skeleton--title { height: 20px; }
.grw-skeleton--btn   { height: 36px; width: 100px; }
.grw-skeleton--avatar { width: 40px; height: 40px; border-radius: 50%; }
.grw-skeleton--card  { height: 120px; border-radius: var(--r-lg); }

/* ─── 14. TABS ───────────────────────────────────────────────── */
.grw-tabs {
  display: flex;
  border-bottom: 2px solid var(--color-border-subtle);
  gap: 0;
}

.grw-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
}

.grw-tab:hover { color: var(--color-text); }
.grw-tab.is-active { color: var(--grw-deep-green); border-bottom-color: var(--grw-deep-green); font-weight: 650; }

.grw-tab__count {
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--r-full);
}

.grw-tab.is-active .grw-tab__count {
  background: rgba(0, 101, 39, 0.1);
  color: var(--grw-deep-green);
}

.grw-tab-panels { margin-top: var(--sp-6); }
.grw-tab-panel { display: none; }
.grw-tab-panel.is-active { display: block; }

/* Pill tabs variant */
.grw-tabs--pill {
  border-bottom: none;
  background: var(--color-surface-alt);
  padding: 4px;
  border-radius: var(--r-lg);
  gap: var(--sp-1);
}

.grw-tabs--pill .grw-tab {
  border-bottom: none;
  border-radius: var(--r-md);
  padding: var(--sp-2) var(--sp-4);
  margin: 0;
}

.grw-tabs--pill .grw-tab.is-active {
  background: var(--color-surface);
  color: var(--grw-deep-green);
  box-shadow: var(--shadow-sm);
}

/* ─── 15. DROPDOWNS ──────────────────────────────────────────── */
.grw-dropdown { position: relative; display: inline-block; }

.grw-dropdown__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  overflow: hidden;
  transform: translateY(-8px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-base);
  transform-origin: top left;
}

.grw-dropdown__menu.is-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

.grw-dropdown__menu--right { left: auto; right: 0; transform-origin: top right; }

.grw-dropdown__item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  font-size: 14px;
  color: var(--color-text);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.grw-dropdown__item:hover { background: var(--color-surface-alt); }
.grw-dropdown__item--danger { color: var(--color-error); }
.grw-dropdown__item--danger:hover { background: rgba(180, 35, 24, 0.06); }
.grw-dropdown__divider { height: 1px; background: var(--color-border-subtle); margin: var(--sp-1) 0; }
.grw-dropdown__label { padding: var(--sp-2) var(--sp-4); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-muted); }

/* ─── 16. PROGRESS ───────────────────────────────────────────── */
.grw-progress {
  height: 8px;
  background: var(--n3);
  border-radius: var(--r-full);
  overflow: hidden;
}

.grw-progress__bar {
  height: 100%;
  background: var(--grw-deep-green);
  border-radius: var(--r-full);
  transition: width var(--transition-slow);
}

.grw-progress--sm { height: 4px; }
.grw-progress--lg { height: 12px; }
.grw-progress--accent .grw-progress__bar { background: var(--grw-light-green); }
.grw-progress--success .grw-progress__bar { background: var(--color-success); }
.grw-progress--warning .grw-progress__bar { background: var(--color-warning); }
.grw-progress--error .grw-progress__bar { background: var(--color-error); }

/* ─── 17. DIVIDERS & LAYOUT HELPERS ─────────────────────────── */
.grw-divider {
  height: 1px;
  background: var(--color-border-subtle);
  margin: var(--sp-6) 0;
}

.grw-divider--label {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
}
.grw-divider--label::before,
.grw-divider--label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border-subtle);
}

/* Grid helpers */
.grw-grid { display: grid; gap: var(--sp-6); }
.grw-grid--2 { grid-template-columns: repeat(2, 1fr); }
.grw-grid--3 { grid-template-columns: repeat(3, 1fr); }
.grw-grid--4 { grid-template-columns: repeat(4, 1fr); }
.grw-grid--kpi { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.grw-flex { display: flex; align-items: center; gap: var(--sp-3); }
.grw-flex--between { justify-content: space-between; }
.grw-flex--wrap { flex-wrap: wrap; }
.grw-flex--col { flex-direction: column; align-items: flex-start; }

/* Section */
.grw-section { margin-bottom: var(--sp-8); }
.grw-section__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-5); gap: var(--sp-4); }
.grw-section__title { font-size: 16px; font-weight: 700; color: var(--color-text); }
.grw-section__subtitle { font-size: 13px; color: var(--color-text-muted); margin-top: 2px; }

/* ─── 18. AUTHENTICATION ─────────────────────────────────────── */
.grw-auth-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100dvh;
}

.grw-auth-brand {
  background: linear-gradient(145deg, var(--grw-dark-green) 0%, #0F3826 40%, var(--grw-deep-green) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--sp-12);
  position: relative;
  overflow: hidden;
}

.grw-auth-brand::before {
  content: 'G';
  position: absolute;
  right: -60px;
  bottom: -60px;
  font-size: 360px;
  font-weight: 900;
  color: rgba(255,255,255,0.03);
  line-height: 1;
  font-family: var(--font-ui);
  pointer-events: none;
  user-select: none;
}

.grw-auth-brand__logo { display: flex; align-items: center; gap: var(--sp-4); }
.grw-auth-brand__badge {
  background: rgba(132, 202, 35, 0.2);
  border: 1px solid rgba(132, 202, 35, 0.35);
  color: var(--grw-light-green);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--r-full);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: var(--sp-5);
}
.grw-auth-brand__headline {
  font-size: 36px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-4);
}
.grw-auth-brand__sub {
  font-size: 15px;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  max-width: 380px;
}
.grw-auth-brand__trust {
  display: flex;
  gap: var(--sp-6);
  flex-wrap: wrap;
}
.grw-auth-brand__trust-item { text-align: center; }
.grw-auth-brand__trust-num { font-size: 24px; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.grw-auth-brand__trust-label { font-size: 11px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }
.grw-auth-brand__footer-copy { font-size: 12px; color: rgba(255,255,255,0.35); margin-top: var(--sp-4); }

.grw-auth-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-12) var(--sp-10);
  background: var(--color-bg);
}

.grw-auth-card {
  width: 100%;
  max-width: 420px;
}

.grw-auth-card__heading { font-size: 26px; font-weight: 800; color: var(--color-text); letter-spacing: -0.02em; margin-bottom: var(--sp-2); }
.grw-auth-card__sub { font-size: 14px; color: var(--color-text-muted); margin-bottom: var(--sp-8); }

/* OTP input */
.grw-otp {
  display: flex;
  gap: var(--sp-3);
}

.grw-otp__digit {
  width: 52px; height: 60px;
  border-radius: var(--r-lg);
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  color: var(--color-text);
  font-family: var(--font-mono);
  transition: all var(--transition-fast);
  outline: none;
}

.grw-otp__digit:focus { border-color: var(--grw-deep-green); box-shadow: var(--focus-shadow); }

/* ─── 19. MISC COMPONENTS ────────────────────────────────────── */

/* Breadcrumbs */
.grw-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  color: var(--color-text-muted);
}
.grw-breadcrumb a { color: var(--color-text-muted); }
.grw-breadcrumb a:hover { color: var(--color-primary); }
.grw-breadcrumb__sep { color: var(--n4); }
.grw-breadcrumb span:last-child { color: var(--color-text); font-weight: 500; }

/* Empty state */
.grw-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-16) var(--sp-8);
  text-align: center;
}
.grw-empty__icon { width: 48px; height: 48px; color: var(--n4); margin-bottom: var(--sp-5); }
.grw-empty__title { font-size: 16px; font-weight: 700; color: var(--color-text); margin-bottom: var(--sp-2); }
.grw-empty__text { font-size: 14px; color: var(--color-text-muted); max-width: 340px; line-height: 1.5; margin-bottom: var(--sp-6); }

/* Spinner */
.grw-spinner {
  display: inline-block;
  width: 24px; height: 24px;
  border: 2.5px solid var(--color-border);
  border-top-color: var(--grw-deep-green);
  border-radius: 50%;
  animation: grw-spin 0.65s linear infinite;
}
.grw-spinner--sm { width: 16px; height: 16px; border-width: 2px; }
.grw-spinner--lg { width: 36px; height: 36px; border-width: 3px; }

/* Tooltip */
.grw-tooltip { position: relative; display: inline-flex; }
.grw-tooltip__content {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--n8);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
  z-index: var(--z-dropdown);
}
.grw-tooltip:hover .grw-tooltip__content { opacity: 1; }

/* Step indicator */
.grw-steps { display: flex; align-items: center; gap: 0; }
.grw-step {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 0;
}
.grw-step__dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: all var(--transition-base);
  z-index: 1;
}
.grw-step__line {
  flex: 1;
  height: 2px;
  background: var(--color-border-subtle);
  transition: background var(--transition-base);
}
.grw-step.is-complete .grw-step__dot { background: var(--grw-deep-green); border-color: var(--grw-deep-green); color: #fff; }
.grw-step.is-complete .grw-step__line { background: var(--grw-deep-green); }
.grw-step.is-current .grw-step__dot { background: var(--color-surface); border-color: var(--grw-deep-green); color: var(--grw-deep-green); box-shadow: 0 0 0 4px rgba(0,101,39,0.1); }

/* File upload drop zone */
.grw-dropzone {
  border: 2px dashed var(--color-border);
  border-radius: var(--r-lg);
  padding: var(--sp-10) var(--sp-8);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--color-surface);
}
.grw-dropzone:hover, .grw-dropzone.is-dragging {
  border-color: var(--grw-deep-green);
  background: rgba(0, 101, 39, 0.03);
}
.grw-dropzone__icon { width: 40px; height: 40px; color: var(--n5); margin: 0 auto var(--sp-4); }
.grw-dropzone__title { font-weight: 650; color: var(--color-text); margin-bottom: var(--sp-1); }
.grw-dropzone__sub { font-size: 13px; color: var(--color-text-muted); }

/* Dashboard stat strip */
.grw-stat-strip {
  display: flex;
  align-items: center;
  gap: 1px;
  background: var(--color-border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--color-border-subtle);
}
.grw-stat-item {
  flex: 1;
  padding: var(--sp-5) var(--sp-6);
  background: var(--color-surface);
  text-align: center;
}
.grw-stat-item__value { font-size: 22px; font-weight: 750; color: var(--color-text); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.grw-stat-item__label { font-size: 12px; color: var(--color-text-muted); margin-top: 3px; font-weight: 500; }

/* ─── 20. UTILITY CLASSES ────────────────────────────────────── */
.u-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.u-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-mt-auto { margin-top: auto; }
.u-ml-auto { margin-left: auto; }
.u-nowrap { white-space: nowrap; }
.u-tabular { font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.u-right { text-align: right; }
.u-center { text-align: center; }
.u-bold { font-weight: 700; }
.u-medium { font-weight: 500; }
.u-rounded { border-radius: var(--r-full); }
.u-mb-0 { margin-bottom: 0 !important; }
.u-mt-0 { margin-top: 0 !important; }

/* ─── 21. KEYFRAME ANIMATIONS ────────────────────────────────── */
@keyframes grw-spin {
  to { transform: rotate(360deg); }
}

@keyframes grw-shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

@keyframes grw-toast-in {
  from { opacity: 0; transform: translateX(24px) scale(0.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes grw-toast-out {
  from { opacity: 1; transform: translateX(0); max-height: 200px; }
  to   { opacity: 0; transform: translateX(24px); max-height: 0; margin: 0; padding: 0; }
}

@keyframes grw-progress {
  from { width: 100%; }
  to   { width: 0%; }
}

@keyframes grw-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes grw-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ─── 22. RESPONSIVE ─────────────────────────────────────────── */

/* ── Rail mode: 840px–1199px — 72px icon strip ── */
@media (min-width: 840px) and (max-width: 1199px) {
  :root { --sidebar-width: var(--sidebar-collapsed-width); }

  .grw-sidebar__name,
  .grw-sidebar__tagline,
  .grw-nav-group__label,
  .grw-nav-item__badge,
  .grw-sidebar__user-info { display: none; }

  /* Span is kept in DOM for tooltip — hide by default */
  .grw-nav-item > span {
    position: fixed;
    left: calc(var(--sidebar-collapsed-width) + 10px);
    background: var(--grw-dark-green);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: var(--r-md);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-fast);
    z-index: calc(var(--z-drawer) + 10);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255,255,255,0.1);
    display: block;
  }
  .grw-nav-item > span::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-width: 0;
    border-right-color: var(--grw-dark-green);
  }
  .grw-nav-item:hover > span { opacity: 1; }

  .grw-nav-item { justify-content: center; padding: var(--sp-3); }
  .grw-nav-item.is-active::before { top: 0; bottom: 0; }
  .grw-sidebar__user { justify-content: center; }
  .grw-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grw-grid--3 { grid-template-columns: repeat(2, 1fr); }

  /* Sidebar must allow overflow for tooltip */
  .grw-sidebar { overflow: visible; }
  .grw-sidebar__body { overflow-y: auto; overflow-x: visible; }
}

/* ── Full collapse: ≤1199px via toggle ── */
@media (max-width: 1199px) {
  .grw-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grw-grid--3 { grid-template-columns: repeat(2, 1fr); }
}

/* ── Mobile: ≤839px — sidebar becomes an off-canvas drawer ── */
@media (max-width: 839px) {
  :root { --topbar-height: 56px; }

  .grw-sidebar {
    transform: translateX(-100%);
    width: 280px !important;
    overflow: hidden;
    transition: transform var(--transition-slow), box-shadow var(--transition-slow);
    box-shadow: none;
  }

  .grw-sidebar.is-mobile-open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }

  /* Restore all text labels when drawer is open */
  .grw-sidebar.is-mobile-open .grw-sidebar__name,
  .grw-sidebar.is-mobile-open .grw-sidebar__tagline,
  .grw-sidebar.is-mobile-open .grw-nav-group__label,
  .grw-sidebar.is-mobile-open .grw-nav-item__badge { display: block; }

  .grw-sidebar.is-mobile-open .grw-nav-item > span {
    position: static;
    opacity: 1;
    background: none;
    color: inherit;
    font-size: 14px;
    font-weight: 500;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
    pointer-events: auto;
    transition: none;
  }
  .grw-sidebar.is-mobile-open .grw-nav-item > span::before { display: none; }

  .grw-sidebar.is-mobile-open .grw-sidebar__user-info {
    display: flex;
    flex-direction: column;
  }
  .grw-sidebar.is-mobile-open .grw-nav-item { justify-content: flex-start; padding: var(--sp-3); }

  /* Mobile close button */
  .grw-sidebar__close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--r-md);
    background: rgba(255,255,255,0.12);
    border: none;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    flex-shrink: 0;
    margin-left: auto;
    transition: background var(--transition-fast);
  }
  .grw-sidebar__close:hover { background: rgba(255,255,255,0.22); color: #fff; }
  .grw-sidebar.is-mobile-open .grw-sidebar__close { display: flex; }

  /* Hide rail span tooltips on mobile */
  .grw-sidebar:not(.is-mobile-open) .grw-nav-item > span { display: none; }

  .grw-main { margin-left: 0; }
  .grw-topbar { left: 0; }
  .grw-content { padding: var(--sp-5); }
  .grw-grid--2, .grw-grid--3, .grw-grid--4 { grid-template-columns: 1fr; }
  .grw-auth-shell { grid-template-columns: 1fr; }
  .grw-auth-brand { display: none; }
  .grw-auth-form { padding: var(--sp-8) var(--sp-5); }
  .grw-modal { border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .grw-overlay { align-items: flex-end; padding: 0; }
  .grw-page-header { flex-direction: column; align-items: flex-start; gap: var(--sp-4); }
  .grw-page-header__right,
  .grw-page-header > a,
  .grw-page-header > div > a,
  .grw-page-header > button { width: 100%; }
  .grw-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ── Extra small: ≤599px ── */
@media (max-width: 599px) {
  .grw-toast-stack { right: var(--sp-4); left: var(--sp-4); width: auto; }
  .grw-stat-strip { flex-direction: column; gap: 0; }
  .grw-stat-item { border-bottom: 1px solid var(--color-border-subtle); width: 100%; }
  .grw-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .grw-content { padding: var(--sp-4); }
  .grw-modal__header,
  .grw-modal__body,
  .grw-modal__footer { padding-left: var(--sp-5); padding-right: var(--sp-5); }
  .grw-kpi-card { padding: var(--sp-4); }
}
